<!DOCTYPE html>
<%@page contentType="text/html;charset=UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%--<%@taglib uri="/authority" prefix="authority" %>--%>
<%--<%@taglib uri="/navigator" prefix="navigator" %>--%>
<%@taglib uri="/tld/pagination.tld" prefix="page" %>

<div class="pageheader">
    <h2>内容管理</h2>
    <div class="breadcrumb-wrapper">
        <span class="left color-999 font13">您当前的位置：</span>
        <ol class="breadcrumb left">
            <li>发布管理</li>
            <li>公告管理</li>
        </ol>
    </div>
</div>
<%--<navigator:navigator url="notice/query.htm"/>--%>

<div class="contentpanel">
    <div class="panel panel-default">
        <form>
            <input type="hidden" name="start" value="${query.start}">
            <input type="hidden" name="length" value="${query.length}">
            <input type="hidden" name="showType" value="${query.showType}">
            <input type="hidden" name="sortField" value="${query.sortField}">
            <input type="hidden" name="sortType" value="${query.sortType}">

            <div class="row">
                <div class="panel-body panel-body2 border-gray-b">
                    <div class="col-md-7">
                        <div class="form-group input-group">

                            <div class="select-container select select-container50 input-group-btn col-dm-3">
                                <select class="select select-offscreen" name="searchKey">
                                    <option value="0" ${query.searchKey == 0 ? 'selected' : ''}>公告标题</option>
                                </select>
                            </div>
                            <input class="form-control form-control2" type="text" name="searchValue"
                                   value="${query.searchValue}" placeholder="请输入查询关键词"/>
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章类型：</label>
                            <div class="col-sm-6">
                                <div class="select-container select select-container50 input-group-btn col-dm-3">
                                    <select class="select select-offscreen" name="type">
                                        <option value="">-请选择-</option>
                                        <option value="0" ${0 == query.type ? 'selected' : ''}>公告</option>
                                        <option value="1" ${1 == query.type ? 'selected' : ''}>动态</option>
                                        <option value="2" ${2 == query.type ? 'selected' : ''}>人们动态</option>
                                        <option value="3" ${3 == query.type ? 'selected' : ''}>导购</option>
                                        <option value="4" ${4 == query.type ? 'selected' : ''}>信息</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="btn-group2 left">
                        <button type="submit" class="btn btn-primary btn-4-query"><i class="icon icon-chaxun"></i>查询
                        </button>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <div class="plus-btn left" style="display:block">
        <button class="container btn-4-file" id="image-container-2"> +</button>
        <p>上传图片</p>
    </div>
    <div class="panel panel-default">
        <div class="row">
            <div class="panel-body panel-body2  plr20">

                <div class="left">
                    <div class="btn-group left btn-group-none2">
                            <button type="button" class="btn btn-primary btn-4-add"><i class="icon icon-tianjia"></i>新增
                            </button>
                    </div>
                </div>

            </div>
        </div>

        <div class="row">
            <div class=" plr20">
                <div class="table-responsive">
                    <table class="table dataTable ">
                        <tbody>
                        <tr>
                            <th width="50">&nbsp;</th>
                            <th><strong>标题</strong></th>
                            <th width="200"><strong>类型</strong></th>
                            <%--<th><strong>内容</strong></th>--%>
                            <th width="200"><strong>操作</strong></th>
                        </tr>
                        <c:forEach items="${paging.items}" var="item" varStatus="status">
                            <tr>
                                <td>${(paging.pageIndex - 1) * paging.pageSize + (status.count)}</td>
                                <td>${item.title}</td>
                                <td>${item.type eq 0 ? '公告' : item.type eq 1?'动态':item.type eq 2?'热门动态':item.type eq 3?'导购':item.type eq 4?'招商信息':''}</td>
                                <%--<td>${item.content}</td>--%>
                                <td>
                                        <a class="btn-4-modify" data-id="${item.id}">修改</a>
                                        <a class="btn-4-delete margin-l-10" data-id="${item.id}">删除</a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <page:page pageIndex="${paging.pageIndex}" pageSize="${paging.pageSize}" count="${paging.count}"/>
            </div>
        </div>
    </div>

    <form class="fup" method="post" enctype="multipart/form-data">
        <input type="hidden" name="container" value=""/>
        <input class="cursor-pointer btn-4-fup" type="file" name="file"
               style="opacity:0;position:absolute;left:0;top:0;width:0;height:0;"/>
    </form>
    <script src="js/ctm/notice-List.js"></script>
</div>
